* Figure A9:  Distribution of Sample Weights in NLS66 and NLSY79
clear
use "${data_dir}DavisMazumderData.dta"

keep if age_firstSurvey<=18
drop if miss0 | miss1
drop if (mom_outOfRange==1 & linkMom==1 & !(dad_outOfRange==0 & linkDad==1)) | (dad_outOfRange==1 & linkDad==1 & !(mom_outOfRange==0 & linkMom==1)) | (linkMom==0 & linkDad==0) 
 

* Put weights on same scale
replace weight = weight/100000 if survey==1966
replace weight = weight/1000 if survey==1979



hist weight if survey==1966 & women==1, xtitle("Weight") ytitle("Density") title("NLS66, Daughters") xlabel(0(5)10) xline(2.8)
graph save ${results_dir}weights66_f.gph, replace


hist weight if survey==1979 & women==1, xtitle("Weight") ytitle("Density") title("NLSY79, Daughters")  xlabel(0(5)10) xline(3.6)
graph save ${results_dir}weights79_f.gph, replace

hist weight if survey==1966 & women==0 & weight<10, xtitle("Weight") ytitle("Density") title("NLS66, Sons")  xlabel(0(5)10) xline(2.8)
graph save ${results_dir}weights66_m.gph, replace


hist weight if survey==1979 & women==0, xtitle("Weight") ytitle("Density") title("NLSY79, Sons")  xlabel(0(5)10) xline(3.6)
graph save ${results_dir}weights79_m.gph, replace

graph combine ${results_dir}weights66_f.gph ${results_dir}weights66_m.gph ///
	${results_dir}weights79_f.gph ${results_dir}weights79_m.gph
graph export ${results_dir}figureA9.png, replace



exit

